<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<import type="css" file="css.form" />
<import type="css" file="css.global" />
<import type="js" file="js.common" />
<import type="js" file="js.jquery" />
<script type="text/javascript">
function CheckForm(){
	var str=document.getElementsByName("supplies_id[]");
	var objarray=str.length;
	var chestr="";
	for (i=0;i<objarray;i++)
	{
	  if(str[i].checked == true)
	  {
	   chestr+=str[i].value+",";
	  }
	}
	if(chestr == "")
	{
	  alert("请至少选择一个办公物品！");
	  return false;
	}
}
</script>
</head>
<body>
<div class="list">
<form action="__URL__/supplies_in_add"  method="post" name="form1" onsubmit="return CheckForm();">
<table class="stripe" cellspacing="0">
    <thead>
        <tr>
		<th width="2%"><input type="checkbox" name="checkid" onclick="if(this.checked==true) { checkAll('supplies_id[]'); } else { clearAll('supplies_id[]'); }" ></th>
		<th width="30%">物品名称</th>
		<th width="28%">规格</th>
		<th width="5%">单位</th>
		<th width="5%">单价</th>
		<th width="5%">库存</th>
		<th width="5%">最低库存</th>
	   </tr>
    </thead>
 
    <tbody>
	<volist name="data_list" id="vo">
    <tr>
		<td><input type="checkbox" name="supplies_id[]" value="{$vo.id}" ></td>
		<td>{$vo.supplies_name}</td>
		<td>{$vo.specification}</td>
		<td>{$vo.unit}</td>
		<td>{$vo.unit_price}</td>
		<td>
			<php>if($vo['sum']<$vo['min_number']){</php>
			<font color="red">{$vo.sum}</font>
			<php>}else{ echo $vo['sum'];}</php><input type="hidden" name="sum[]" value="{$vo.sum}" >
		</td>
		<td>{$vo['min_number']}</td>
	</tr>
	</volist>
	</tbody>
	<thead>
        <tr>
            <th colspan="8">
				<input type="hidden" name="tpl" value="1" >
				<input type="submit" value="提交" class="submit">&nbsp;&nbsp;
	       		<input type="button" value="返回" class="button" onClick="back();">
			</th>
        </tr>
    </thead>
</table>
</form>
</div>
</body>
</html>
<script language="javascript">
$(document).ready(function(){  
	$(".stripe tr").mouseover(function(){    
	  $(this).addClass("over");}).mouseout(function(){   
			$(this).removeClass("over");}) 
  	$(".stripe tr:even").addClass("alt");
}); 
</script>  